package net.ssta.util.bill.chargeobj;

import org.apache.log4j.Logger;

import net.ssta.util.bill.UserBill;
import net.ssta.util.bill.UserBillException;

public class KjcgCharge implements ChargeInterface{
	private static Logger log = Logger.getLogger(KjcgCharge.class.getClass()); 
	private String cgId;
	private String title;
	
	/**
	 * 
	 * @param _cgId
	 */
	public KjcgCharge(String _cgId,String _title){
		cgId=_cgId;
		title=_title;
	}
	
	/**
	 * 根据扣费对象的主键，来判断其所需的费用
	 * @param chargeId
	 * @return
	 */
	public int calCostNumber()throws UserBillException{
		return CostNumberConstants.getKjcg();
	}
	
	/**
	 * 根据账单来扣费
	 * @param bill
	 * @throws UserBillException
	 */
	public String getChargeType(){
		return "kjcg";
	}
	
	public UserBill initBill(UserBill bill){
		bill.setInfoId(cgId);
		bill.setCType(this.getChargeType());
		bill.setTitle(title);
		return bill;
	}

}
